﻿Imports WindowsFormsAero.TaskDialog
Public Class Form1

    Private Sub SearchTextBox1_SearchStarted(sender As Object, e As EventArgs) Handles SearchTextBox1.SearchStarted
        WebBrowser1.Navigate("https://www.google.co.kr/search?q=마인크래프트 " + ComboBox1.Text + " " + SearchTextBox1.Text)
    End Sub

    Private Sub CommandLink1_Click(sender As Object, e As EventArgs) Handles CommandLink1.Click
        Process.Start("http://minecraft-ko.gamepedia.com/%EC%A1%B0%ED%95%A9")
    End Sub

    Private Sub CommandLink2_Click(sender As Object, e As EventArgs) Handles CommandLink2.Click
        Process.Start("http://minecraft-ko.gamepedia.com/%EB%8D%B0%EC%9D%B4%ED%84%B0_%EA%B0%92")
    End Sub

    Private Sub CommandLink3_Click(sender As Object, e As EventArgs) Handles CommandLink3.Click
        OMS.Show()
    End Sub



    Private Sub CommandLink4_Click(sender As Object, e As EventArgs) Handles CommandLink4.Click
        Select Case TreeView1.SelectedNode.Text
            Case "우마공"
                Process.Start("http://cafe.naver.com/minecraftgame")
            Case "위키"
                Process.Start("http://minecraft-ko.gamepedia.com/Minecraft_Wiki")
            Case "공식 사이트"
                Process.Start("http://minecraft.net")
            Case "9마인크래프트"
                Process.Start("http://www.9minecraft.net/")
        End Select
    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        TaskDialog.Show("정보 확인 시작...", "안내", "정보 확인을 시작합니다.", TaskDialogButton.OK, TaskDialogIcon.Information)
        If My.Settings.Logined = True Then
            TextBox1.Text = vbCrLf & vbCrLf & "닉네임: " & My.Settings.Nick & vbCrLf & "아이디: " & My.Settings.ID
        Else
            TextBox1.Text = vbCrLf & vbCrLf & "로그아웃됨"
        End If

    End Sub

    Private Sub 로그아웃ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 로그아웃ToolStripMenuItem.Click
        My.Settings.Logined = False
    End Sub

    Private Sub 로그인ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 로그인ToolStripMenuItem.Click
        Login.Show()
    End Sub

    Private Sub 회원가입ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 회원가입ToolStripMenuItem.Click
        Register.Show()
    End Sub

    Private Sub 파일ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 파일ToolStripMenuItem.Click

    End Sub

    Private Sub 개발자ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 개발자ToolStripMenuItem.Click
        TaskDialog.Show("베이직스터더(Stever)", "개발자", "Form 우마공", TaskDialogButton.OK, TaskDialogIcon.SecuritySuccess)
    End Sub

    Private Sub 버전ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 버전ToolStripMenuItem.Click
        TaskDialog.Show("1.0 베타", "버전", "아직 베타라 미흡한 점이 많습니다. 버그는 1:1로 보내주세요~", TaskDialogButton.OK, TaskDialogIcon.SecuritySuccess)
    End Sub

    Private Sub WebBrowser1_DocumentCompleted(sender As Object, e As WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted

    End Sub

    Private Sub WebBrowser1_NewWindow(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles WebBrowser1.NewWindow
        Process.Start(WebBrowser1.Document.ActiveElement.GetAttribute("href"))
        e.Cancel = True
    End Sub
End Class
